﻿namespace EchoWx.Models
{
    /// <summary>
    /// 基本返回实体
    /// </summary>
    public class BaseResponse<T>
    {
        /// <summary>
        /// 状态码
        /// </summary>
        public int Code { get; set; } = ResultCode.NormalCode;

        /// <summary>
        /// 返回信息
        /// </summary>
        public string Message { get; set; } = "";

        /// <summary>
        /// 若返回的数据为单个集合（前端需要告知行数，则返回行数，否则默认为0）
        /// </summary>
        public long Count { get; set; } = 0;

        /// <summary>
        /// 返回数据
        /// </summary>
        public T Data { get; set; } = default(T);
    }
}
